$(document).ready(function(){
	$(".itemRows").each(function(idx, item){
		$(item).mouseenter(function(event){
			$(item).css("background-color", "#fdeada");
		}).mouseleave(function(event){
			$(item).css("background-color", "#fff");
		});
	});
	
	$(":input[name='groupsBtn']").each(function(idx, item){
		$(item).on("click", function(event){
			var fields = $(item).parent("td").parent("tr").find(">td");
			var fnId = $(fields).eq(1).find(">span").eq(0).text();
			var fnNm = $(fields).eq(2).text();
			var options = new Object();
			options["url"] = "/template/system/function/_groups/"+fnId;
			options["jqwId"] = "groupJqwPop";
			options["title"] = "["+fnNm+"] 사용 그룹";
			options["resizable"] = false;
			options["width"] = "500";
			options["height"] = "300";
			jqwOpen(options);
		});
	});
	
	$(":input[name='detailBtn']").each(function(idx, item){
		$(item).on("click", function(event){
			var fields = $(item).parent("td").parent("tr").find(">td");
			var fnId = $(fields).eq(1).find(">span").eq(0).text();
			var fnNm = $(fields).eq(2).text();
			var options = new Object();
			options["url"] = "/template/system/function/_detail/"+fnId;
			options["jqwId"] = "detailJqwPop";
			options["title"] = "["+fnNm+"] 상세 정보";
			options["resizable"] = false;
			options["width"] = "500";
			options["height"] = "320";
			jqwOpen(options);
		});
	});
	
	$(":input[name='reviseBtn']").each(function(idx, item){
		$(item).on("click", function(event){
			var fields = $(item).parent("td").parent("tr").find(">td");
			var fnId = $(fields).eq(1).find(">span").eq(0).text();
			var fnNm = $(fields).eq(2).text();
			var options = new Object();
			options["url"] = "/template/system/function/_regFormRevise/"+fnId;
			options["data"] = "sysCodeType="+$("#enCodeType").val()+"&sysCodeTypeStatus="+$("#enCodeTypeStatus").val();
			options["jqwId"] = "reviseJqwPop";
			options["title"] = "["+fnNm+"] 기능 수정";
			options["resizable"] = false;
			options["width"] = "550";
			options["height"] = "320";
			jqwOpen(options);
		});
	});
});